import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/collect',
      name: 'collect',
      component: () => import('../views/CollectView.vue')
    },
    {
      path: '/personal',
      name: 'personal',
      component: () => import('../views/PersonalView.vue')
    },
    {
      path: "/:pathMatch(.*)*", //无该页面
      meta: {
        title: "找不到此页面",
      },
      component: () => import('../views/404.vue')
    }, {
      path: "/403", //权限不足页面
      meta: {
        title: "权限不足",
      },
      component: () => import('../views/403.vue')
    }

  ]
})

export default router
